import request from '@/utils/request'

// 查询上传材料列表
export function listUpload(query) {
  return request({
    url: '/material/upload/list',
    method: 'get',
    params: query
  })
}

// 查询上传材料详细
export function getUpload(materialId) {
  return request({
    url: '/material/upload/' + materialId,
    method: 'get'
  })
}

// 新增上传材料
export function addUpload(data) {
  return request({
    url: '/material/upload',
    method: 'post',
    data: data
  })
}

// 修改上传材料
export function updateUpload(data) {
  return request({
    url: '/material/upload',
    method: 'put',
    data: data
  })
}

// 删除上传材料
export function delUpload(materialId) {
  return request({
    url: '/material/upload/' + materialId,
    method: 'delete'
  })
}

// 获取按钮状态
export function getShowResult() {
  return request({
    url: '/material/upload/getShowResult',
    method: 'get'
  })
}
// 更新按钮状态
export function updateShowResult(showResult) {
  return request({
    url: '/material/upload/updateShowResult/' + showResult,
    method: 'put'
  })
}

